package tech.eyao.hs60x.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import tech.eyao.hs60x.model.domain.AccountRelationDO;
/**
 * 
 * 类AccountRelationDOMapper.java的实现描述：账户绑定关系
 */
public interface AccountRelationDOMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AccountRelationDO record);

    AccountRelationDO selectByPrimaryKey(Long id);

    int updateByPrimaryKey(AccountRelationDO record);

	AccountRelationDO getAccountRelation(@Param("userId") long userId, @Param("watchId")long watchId);

	AccountRelationDO getAccountAdminByWatchId(Long wacthAccountId);

	int unbindWatch(@Param("watchId")long watchId, @Param("userId")long userId);

	List<AccountRelationDO> getAccountRelationByAccountId(long userId);

	// 管理员关系
	AccountRelationDO getAccountAdminByAccountId(long userId);
	
	// 手表绑定关系列表
	List<AccountRelationDO> getWatchRelationList(long watchId);
}